<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>{%$type.typename%} - {%$lngpack.sitename%}</title>
<meta name="keywords" content="{%$lngpack.keyword%}" />
<meta name="description" content="{%$lngpack.description%}" />
<link href="/css/style_cn.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/js/jquery.min.js"></script>
<script type="text/javascript" src="/js/jquery-1.js"></script>
<script type="text/javascript">
//交易默认为出金操作
var transactionType = 0;
function {%$form.formcode%}form(seccodetype) {
	var amount = $('input[name="Amount"]').val();
	amount = $.trim(amount);
	if(amount.length < 1) {
		$('input[name="Amount"]').focus();
		alert("金额不能为空!");
		return false;
	}
        var patrn=/^\d+$/;  
	if(!patrn.exec(amount)) {
		$('input[name="Amount"]').focus();
		alert("金额信息填写错误！");
		return false;
	}
        var amountVal = $('td').last().text();
	if(transactionType == 0) {
		if(parseFloat($('input[name="Amount"]').val()) >= parseFloat(amountVal)) {
			alert("输入金额须小于可用保证金");
			return false;
		}
	}

	var memberName = $('input[name="memberName"]').val();
	memberName = $.trim(memberName);
	if(memberName.length < 1) {
		$('input[name="memberName"]').focus();
		alert("账户姓名不能为空！");
		return false;
	}
	
	var memberNO = $('input[name="memberNO"]').val();
	memberNO = $.trim(memberNO);
	if(memberNO.length < 1) {
		$('input[name="memberNO"]').focus();
		alert("交易账号不能为空！");
		return false;
	}

	var patrn=/^[0-9]{6}$/;  
	if(!patrn.exec(memberNO)) {
		$('input[name="memberNO"]').focus();
		alert("交易账户信息填写错误！");
		return false;
	}
	
	var memberMobile = $('input[name="memberMobile"]').val();
	memberMobile = $.trim(memberMobile);
	if(memberMobile.length < 1) {
		$('input[name="memberMobile"]').focus();
		alert("联系电话不能为空！");
		return false;
	}
	
	var memberEmail = $('input[name="memberEmail"]').val();
	memberEmail = $.trim(memberEmail);
	if(memberEmail.length < 1) {
		$('input[name="memberEmail"]').focus();
		alert("电子邮件不能为空！");
		return false;
	}
	
	var bankName = $('input[name="bankName"]').val();
	bankName = $.trim(bankName);
	if(bankName.length < 1) {
		$('input[name="bankName"]').focus();
		alert("银行名称不能为空！");
		return false;
	}
	
	if (transactionType == 0) {
		var bankAccount = $('input[name="bankAccount"]').val();
		bankAccount = $.trim(bankAccount);
		if(bankAccount.length < 1) {
			$('input[name="bankAccount"]').focus();
			alert("银行账号不能为空！");
			return false;
		}
		
		var memberIDCard = $('input[name="memberIDCard"]').val();
		memberIDCard = $.trim(memberIDCard);
		if(memberIDCard.length < 1) {
			$('input[name="memberIDCard"]').focus();
			alert("银行电汇代码不能为空！");
			return false;
		}
	}
	
	
}
function transactionTypeSelect(obj) {
        if (obj.value == '入金') {
			transactionType = 1;
            $('#bankName_alert').hide();
            $('#bankAccount_id').hide();
            //$('#currency_id').hide();
            $('#Amount_alert').hide();
			$('#memberIDCard_id').hide();
            $('#bank_info').show();
        } else {
			transactionType = 0;
            $('#bankName_alert').show();
            $('#bankAccount_id').show();
            //$('#currency_id').show();
            $('#Amount_alert').show();
			$('#memberIDCard_id').show();
            $('#bank_info').hide();
        }
}
</script>
    </head>
    <body>
        <div class="all">
            {%link file="cn/public/head.html"%}
            <div class="content" style="min-height:10px">
                <h2 class="title">{%$type.typename%}</h2>
                <div style="margin-top: 10px">
                    {%include file="default/metaTrader/index.php"%}
                </div>
            </div>
            <div class="dengluz zhuce" style="padding-top: 0px;float: left;width: auto;">
                <div style="width: auto;float: left">
                    <form name="{%$form.formcode%}" id="{%$form.formcode%}" method="post" action="{%$form.action%}"  onSubmit="return {%$form.formcode%}form('{%$form.isseccode%}')">
                        <input type="hidden" name="linkurl" value="add">
                        <input type="hidden" name="fgid" id="fgid" value="{%$form.fgid%}">
                        <input type="hidden" name="formcode" id="formcode" value="{%$form.formcode%}">
                        {%forlist from=$array key=i%}
                            {%if $array[i].isline==1%}
                                {%$array[i].typename%} 
                            {%else%}
                                <div id="{%$array[i].attrname%}_id">
                                    <span style="width: 190px">{%$array[i].typename%}:</span>
                                    {%if $array[i].inputtype=='string'%}
                                        <input type="text" name="{%$array[i].attrname%}" size="{%$array[i].attrsize%}" maxlength="{%$array[i].attrlenther%}" value="{%$array[i].attrvalue%}" class="input1"/>
                                        {%if $array[i].typeremark!=''%}
                                            <div id="{%$array[i].attrname%}_alert" class="con_text" style="color: red;display: inline">{%$array[i].typeremark%}
                                            </div>
                                        {%/if%}
                                        <br />
                                    {%/if%}

                                    {%if $array[i].inputtype=='radio'%}
                                        <div style="display:inline">
										{%forlist from=$array[i].attrvalue key=ii%}
										    <input style="height:27px; margin-bottom:5px; vertical-align: middle" onclick="{%$array[i].attrname%}Select(this);" {%if $array[i].attrvalue[ii].selected=='selected'%}checked="checked" {%/if%}name="{%$array[i].attrname%}" type="radio" value="{%$array[i].attrvalue[ii].name%}" /> {%$array[i].attrvalue[ii].name%}
                                        {%/forlist%}
										</div>
                                        <br />
                                    {%/if%}                                
                                </div>    
                            {%/if%}
                        {%/forlist%}

                        {%if $form.isseccode==1%}
                            <div id="{%$array[i].attrname%}_id" >
                                <span style="width: 190px">验证码:</span>
                                <input type="text" id="code" name="seccode" style="width: 70px;margin-right: 5px" class="input1" maxlength="4" size="3" style="text-transform: uppercase;"/>
                                <img title="Try a new code" id="{%$form.formcode%}seccodesrc" onClick="sessionimg('{%$form.formcode%}seccodesrc','{%$rootdir%}')" src="{%$seccodelink%}" style="cursor: pointer;" align="absmiddle"/>
                            </div>
                        {%/if%}
                        <input style="margin-left:160px;" class="submit" type="submit" name="submit" id="{%$form.formcode%}botton" value="提交" />
                        <input class="cancel" type="reset" name="reset" value="重置"  />
                    </form>
                </div>
                <div id="bank_info" class="con_text" style="width: auto;display: none;float: right;margin-left: 30px;">
                    <br/>存入银行信息:<br/><br/>
                    &nbsp;美元<br/>
					&nbsp;&nbsp;&nbsp;&nbsp;收款银行:中国银行香港有限公司(银行地址:香港花园道1号)<br/>
					&nbsp;&nbsp;&nbsp;&nbsp;收款人:博会金融香港有限公司<br/>
					&nbsp;&nbsp;&nbsp;&nbsp;账号:012-676-9-214493-1<br/>
					&nbsp;&nbsp;&nbsp;&nbsp;电汇代码:BKCHHKHHXXX<br/>
					&nbsp;港币<br/>
					&nbsp;&nbsp;&nbsp;&nbsp;收款银行:中国银行香港有限公司(银行地址:香港花园道1号)<br/>
					&nbsp;&nbsp;&nbsp;&nbsp;收款人:博会金融香港有限公司<br/>
					&nbsp;&nbsp;&nbsp;&nbsp;账号:012-676-9-214493-9<br/>
					&nbsp;&nbsp;&nbsp;&nbsp;电汇代码:BKCHHKHHXXX<br/>
					&nbsp;&nbsp;&nbsp;&nbsp;银行代码:012<br/>

                </div>
            </div>
            
            {%link file="cn/public/footer.html"%}	
        </div>
    </body>
</html>
